﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

#pragma warning disable CA1814 // Prefer jagged arrays over multidimensional

namespace Infrastructure.Migrations
{
    /// <inheritdoc />
    public partial class init : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AlterDatabase()
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.CreateTable(
                name: "uc_users",
                columns: table => new
                {
                    Id = table.Column<long>(type: "bigint", nullable: false),
                    LoginName = table.Column<string>(type: "varchar(32)", maxLength: 32, nullable: false)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    RealName = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Email = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Phone = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Password = table.Column<string>(type: "varchar(32)", maxLength: 32, nullable: true)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Status = table.Column<int>(type: "int", nullable: false),
                    Attr = table.Column<long>(type: "bigint", nullable: false),
                    ExtInfo = table.Column<string>(type: "text", unicode: false, nullable: false)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    CreateTime = table.Column<DateTime>(type: "datetime", nullable: false),
                    UpdateTime = table.Column<DateTime>(type: "datetime", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_uc_users", x => x.Id);
                })
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.InsertData(
                table: "uc_users",
                columns: new[] { "Id", "Attr", "CreateTime", "Email", "ExtInfo", "LoginName", "Password", "Phone", "RealName", "Status", "UpdateTime" },
                values: new object[,]
                {
                    { 111L, 1L, new DateTime(2024, 9, 23, 16, 55, 50, 255, DateTimeKind.Local).AddTicks(6060), "11727146@qq.com", "{\"Roles\":[132]}", "Yzy", "123", "17796703670", "Yzy", 1, new DateTime(2024, 9, 23, 16, 55, 50, 255, DateTimeKind.Local).AddTicks(6076) },
                    { 222L, 1L, new DateTime(2024, 9, 23, 16, 55, 50, 255, DateTimeKind.Local).AddTicks(6079), "11727146@qq.com", "{\"Roles\":[132]}", "Yzy", "123", "17796703670", "Yzy", 1, new DateTime(2024, 9, 23, 16, 55, 50, 255, DateTimeKind.Local).AddTicks(6082) },
                    { 333L, 1L, new DateTime(2024, 9, 23, 16, 55, 50, 255, DateTimeKind.Local).AddTicks(6084), "11727146@qq.com", "{\"Roles\":[132]}", "Yzy", "123", "17796703670", "Yzy", 1, new DateTime(2024, 9, 23, 16, 55, 50, 255, DateTimeKind.Local).AddTicks(6086) }
                });
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "uc_users");
        }
    }
}
